# -*- coding: utf-8 -*-
from odoo import models, api, fields, tools
from odoo.exceptions import UserError
import re


class product_temp(models.Model):

    _name = "proman.product_temp"
    _description = "产品模板"
    _table = "proman_product_temp"
    _order = "sequence"

    sequence = fields.Integer(string="排序",translate = 0)
    name = fields.Char(string="产品模板名称",help = '请输入产品模板名称',translate = 0)
    company_id = fields.Many2one(string="所属公司",comodel_name = 'res.company',default = lambda self:self.env.company,required = 1,translate = 0)
    project_id = fields.Many2one(string="项目名称",comodel_name = 'proman.project_base',translate = 0)
    product_temp_items = fields.One2many(string="产品清单",comodel_name = 'proman.product_temp_item',inverse_name = 'main_id',translate = 0)
    memo = fields.Html(string="备注说明",translate = 0)
